# 从文件获取一个字符串
class_body = """
def greeting(self):
    print("greeting")


def jump(self):
    print("jump")

"""

class_dict = {}
# 将字符串转换为代码并放到字典里
exec(class_body, globals(), class_dict)
# 使用type生成一个类，将字典作为参数传入
Customer = type("Customer", (object,), class_dict)

c = Customer()

c.greeting()
c.jump()
